package com.semp.jadoma.admin.utils;

import java.text.SimpleDateFormat;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.log4j.Logger;

public class Config {

	private final static Logger logger = Logger.getLogger(Config.class);
	private static Configuration config;
	
	static {
		try {
			config = new XMLConfiguration("admin-config.xml");
		} catch (ConfigurationException e) {
			logger.error("", e);
		}
	}
	
	public final static String IMAGE_PATH= config.getString("image-path");
	public final static String IMAGE_URL= config.getString("image-url");
	public final static int THUMB_SIZE= config.getInt("thumb-size");
	public final static String DATE_PATTERN_J= config.getString("date.jpattern");
	public final static SimpleDateFormat DATE_FORMAT_J= new SimpleDateFormat(DATE_PATTERN_J);
	public final static String DATE_PATTERN_JS= config.getString("date.jspattern");

	
	public static String IMAGE_FULL_PATH = "";
}
